import React from 'react';
import { Button } from 'antd';
import CommonList from '../../../components/CommonLists/list';

class PolicyList extends CommonList {
  constructor(props) {
    super(props);
    this.api = 'template';
    this.operatorWidth = 180;
    this.state = {
      events: [],
    };
    this.editButton = (record) => {
      return (
        <Button
          size='small'
          type='link'
          onClick={this.edit.bind(this, record)}
        >
          编辑
        </Button>
      );
    };
    this.delButton = (record) => {
      return (
        <Button
          size='small'
          type='link'
          onClick={this.delete.bind(this, record)}
        >
          删除
        </Button>
      );
    };
    this.btnGroup = [this.editButton, this.delButton];
    this.publishRef = null
  }
  componentDidMount() {}

  // 删除时的参数
  getDeleteParam = (record) => {
    return { strategy_template_id: record.strategy_template_id };
  };
}

export default PolicyList;
